t = codesters.Teacher()
reflections = t.find_text('reflect')
try:
tval1 = t.find_text('reflect')[0][1]
tval1a = sprite.get_x()
tval1b = sprite.get_y()
except:
tval1 = "DNE"
tval1a = "DNE"
tval1b = "DNE"
try:
tval2 = t.find_text('rotate')
except:
tval2 = "DNE"
try:
tval3 = t.find_text('translate')
except:
tval3 = "DNE"
t1 = TestObjective()
t1.add_success('x_axis' in tval1 and tval1a == -100 and tval1b == 100 and len(reflections) ==1, "Great job!")
t1.add_failure(tval1 == "DNE", "Try a Geometry Transformation command that maps your sprite to the target!")
t1.add_failure('y_axis' in tval1, "Oops! Try the other axis!")
t1.add_failure('x_axis' in tval1 and (tval1a != -100 or tval1b != 100), "Oops! Did you move your sprite before doing your reflection?")
t2 = TestObjective()
t2.add_failure(tval2 != [], "That's not the transofrmation we're looking for here. Try choosing the transformation maps one onto the other in 1 step.")
t2.add_failure(tval3 != [], "Try using a different transformation to map one triangle onto the other.")
tester = TestManager()
tester.display_graphics = False
tester.add_test_list([t1, t2])
tester.run_tests()
tester.display_first_feedback()
Are you already running a Codesters project in another tab or window?
Micro:bit can only connect to one web page at a time.
Try stopping other Codesters projects or closing
other tabs or windows that may be using your Micro:bit.
If that doesn't fix the problem try disconnecting your Micro:bit,
reloading this page, and reconnecting your Micro:bit.